1. Field of the Invention
This invention relates to distributed lock managers for use in multicomputer systems having access to shared files.
2. Related Art
In a closely coupled system, multiple data processing nodes, each under control of its own operating system, are joined by a communications network and have shared files stored on disks. Access to the shared files is coordinated by a set of protocols which are implemented in each of the respective system's software.
One concern in closely coupled systems is properly synchronizing shared file accesses to ensure that conflicts do not occur between tasks. For example, in a banking system, one task may be a customer withdrawing money from his account using an automatic teller machine and another task may be the bank updating the customer's account to process a check. If these tasks are not synchronized, the resulting account balance may be incorrect.
One method of synchronizing tasks in a file sharing environment is known as locking. By this method, a task first obtains access to a data structure known as a lock and then indicates the type of access that is desired in order to either read or modify data in the file, database or other data object that is protected by the lock. Other tasks are then prevented from accessing or given only limited (e.g. read only) access to the protected data until the one task changes the indication of the type of access desired and releases the lock so that other tasks can access it.
Commonly, a global lock manager is provided to resolve lock requests among tasks running on different processors and to maintain queues of tasks awaiting access to particular lock entities. One approach to global lock management is to distribute the locking function among the coupled processors. This method is referred to as distributed lock management. Closely coupled systems having a distributed lock manager are described, for example, in U.S. Pat. No. 5,161,227 to Dias et al. and U.S. Pat. No. 5,226,143 to Baird et al.
In systems having a distributed lock manager, an attempt is typically made to resolve the lock requests from within the processor. Whenever this is not possible, communication with a remote processor is initiated to resolve the lock request.
Distributed locking protocols commonly divide the lock space into multiple partitions which are assigned to respective ones of the coupled processors. Requests for an entity (i.e. a particular lock data structure) are sent to and resolved by the processor which owns the partition to which the entity belongs.
A distributed lock manager requires coordination between nodes to enforce the locking protocol. This coordination is typically achieved by exchanging control messages between the nodes.